/*
 * @Author: jqm123 2289662078@qq.com
 * @Date: 2025-08-04 15:42:08
 * @LastEditors: jqm123 2289662078@qq.com
 * @LastEditTime: 2025-09-08 09:50:02
 * @FilePath: /anxinxiu/src/api/modules/coupon.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from "@/utils/request";

const modules = {
  //我的优惠券列表
  my_coupon_list: (params) =>
    request({
      method: "get",
      params,
      url: "/coupon/myCoupon/page",
    }),
  coupon_list: (params) =>
    request({
      method: "get",
      params,
      url: "/coupon/myCouponList",
    }),
  //优惠券详情
  coupon_detail: (params) =>
    request({
      method: "get",
      params,
      url: "/coupon/myCoupon/detail",
    }),
  //领取优惠券
  receive_coupon: (params) =>
    request({
      method: "get",
      params,
      url: "/coupon/receive",
    }),
  //优惠券核销
  writeOff_coupon: (data) =>
    request({
      method: "post",
      data,
      url: "/coupon/writeOff",
    }),
  //选择优惠券
  select_coupon: (data) =>
    request({
      method: "post",
      data,
      url: "/settle/select/coupon",
    }),
};

export default modules;
